Skip to content

Conversation

@canfuu
Copy link
Collaborator

@canfuu canfuu commented Feb 4, 2026

[0.1.3] - 2026-02-04

Added

Observation & Traceability

  • OpenTelemetry Observability Support: Full OpenTelemetry native API integration
    • BaseAgentObservationLifecycleListener: Base lifecycle listener for Agent observability
    • CodeactObservationDocumentation: Standardized observation metrics definition (Hook, Interceptor, React, Execution, CodeGen, ToolCall)
    • EvaluationObservationLifecycleListener: Observability listener for Evaluation Graph
  • Tool Call Tracing: New tool call recording and tracing capabilities
    • ToolCallRecord: Tool call record model with call order and tool name
    • ExecutionRecord.callTrace: Tool call trace list during code execution
    • ToolRegistryBridge: Tool registry bridge
  • Observation Helper Classes:
    • HookObservationHelper: Hook execution observation helper
    • InterceptorObservationHelper: Interceptor execution observation helper
    • OpenTelemetryObservationHelper: General OpenTelemetry observation helper
  • Observation Contexts:
    • HookObservationContext: Hook observation context
    • InterceptorObservationContext: Interceptor observation context
    • ReactPhaseObservationContext: React phase observation context
    • CodeGenerationObservationContext: Code generation observation context
    • CodeactExecutionObservationContext: Code execution observation context
    • CodeactToolCallObservationContext: Tool call observation context

Prompt Contributor Module

  • PromptContributor Mechanism Refactoring: Replaced PromptBuilder/PromptManager with a more flexible Prompt contribution system
    • PromptContributor: Prompt contributor interface
    • PromptContributorManager: Prompt contributor manager interface
    • DefaultPromptContributorManager: Default implementation with priority sorting and dynamic registration
    • PromptContributorContext: Context interface
    • OverAllStatePromptContributorContext: OverAllState-based context implementation
  • Evaluation-based Prompt Contribution:
    • EvaluationBasedPromptContributor: Abstract base class for generating Prompts based on evaluation results
    • PromptContributorModelHook: Abstract base class for integrating PromptContributor into ModelHook
    • ReactPromptContributorModelHook: Prompt contribution Hook for React phase
    • CodeactPromptContributorModelHook: Prompt contribution Hook for Codeact phase
  • Auto Configuration: PromptContributorAutoConfiguration provides out-of-the-box configuration

Other Enhancements

  • ParameterTree: Enhanced parameter tree definition capabilities
  • CommonSenseInjectionTool: Common sense injection tool
  • ToolContextHelper: Tool context helper class
  • CodeactStateKeys: Codeact state key constants

Changed

  • GraalCodeExecutor: Enhanced code executor with tool call tracing support
  • PythonToolViewRenderer: Enhanced Python tool view rendering capabilities
  • EvaluationService: Support for parent Span for distributed tracing
  • EvaluationSuiteBuilder: Enhanced evaluation suite building capabilities
  • ReplyCodeactToolFactory: Optimized reply tool factory implementation
  • AfterAgentLearningHook: Enhanced learning Hook implementation
  • AsyncLearningHandler: Optimized async learning handler
  • CodeactAgent: Refactored to support new observation and Prompt contribution mechanism

Removed

  • PromptBuilder: Replaced by PromptContributor
  • PromptManager: Replaced by PromptContributorManager
  • PromptInjectionInterceptor: Replaced by PromptContributorModelHook
  • CodeactToolFilter: Tool filter
  • WhitelistMode: Whitelist mode enum

Copilot AI review requested due to automatic review settings February 4, 2026 06:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project to version 0.1.3, introducing comprehensive OpenTelemetry observability support, a new Prompt Contributor mechanism, and enhanced tool call tracing capabilities. The changes also include bug fixes, dependency updates, and removal of deprecated features.

Changes:

  • Added full OpenTelemetry native API integration with observation contexts, helpers, and lifecycle listeners for distributed tracing
  • Introduced tool call tracing with ToolCallRecord model and enhanced GraalCodeExecutor to track tool invocations during code execution
  • Refactored Prompt system by replacing PromptBuilder/PromptManager with flexible PromptContributor mechanism
  • Updated dependencies including spring-ai-alibaba (1.1.0.0 → 1.1.2.0) and added OpenTelemetry BOM (1.35.0)
  • Removed deprecated features including CodeactToolFilter, WhitelistMode, and state propagation mechanisms
  • Fixed bugs in FastIntentReactHook, context bindings, and improved Python code generation string escaping

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pom.xml Version bump to 0.1.3, spring-ai-alibaba upgrade to 1.1.2.0, OpenTelemetry BOM added
assistant-agent-core/* New observation contexts, helpers, ToolCallRecord model, enhanced GraalCodeExecutor with tracing
assistant-agent-evaluation/* EvaluationObservationLifecycleListener, parent Span support, rawPrompt tracking
assistant-agent-extensions/* AfterAgentLearningHook observation data, AsyncLearningHandler custom executor support, bug fixes
assistant-agent-autoconfigure/* Removed CodeactToolFilter/WhitelistMode, state propagation, subAgentSystemPrompt
assistant-agent-common/* Enhanced ParameterTree with Python string escaping, CodeactTool null-safety improvements
README.md Restructured documentation with links to java2ai.com documentation site
CHANGELOG.md Comprehensive 0.1.3 release notes with added/changed/removed sections

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +22
import com.alibaba.assistant.agent.common.hook.AgentPhase;
import com.alibaba.assistant.agent.common.hook.HookPhases;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate imports detected. Lines 21-22 repeat the imports from lines 19-20 (AgentPhase and HookPhases). Remove the duplicate import statements.

Copilot uses AI. Check for mistakes.
/**
* 存储每个节点的 parent Scope(用于正确的父子关系)
*/
private final ConcurrentHashMap<String, Scope> parentScopes = new ConcurrentHashMap<>();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contents of this container are never accessed.

Copilot uses AI. Check for mistakes.
// Add additional lifecycleListeners to existing config
if (!lifecycleListeners.isEmpty()) {
for (com.alibaba.cloud.ai.graph.GraphLifecycleListener listener : lifecycleListeners) {
compileConfig.lifecycleListeners().offer(listener);
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method buildConfig ignores exceptional return value of Queue.offer.

Suggested change
compileConfig.lifecycleListeners().offer(listener);
boolean added = compileConfig.lifecycleListeners().offer(listener);
if (!added) {
logger.warn("CodeactAgentBuilder#buildConfig - reason=无法将LifecycleListener添加到已有CompileConfig, listener={}",
listener != null ? listener.getClass().getName() : "null");
}

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@AQing-527 AQing-527 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AQing-527 AQing-527 merged commit 096f1b9 into main Feb 4, 2026
1 check passed
@AQing-527 AQing-527 deleted the feature/upgrade_to_0.1.3 branch February 4, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants